package org.pearl.tactuator.endpoint;

import org.springframework.boot.actuate.endpoint.annotation.ReadOperation;
import org.springframework.boot.actuate.endpoint.annotation.Selector;
import org.springframework.boot.actuate.endpoint.annotation.WriteOperation;
import org.springframework.boot.actuate.endpoint.web.annotation.EndpointWebExtension;
import org.springframework.stereotype.Component;

import java.util.HashMap;
import java.util.Map;

/**
 * Created by TD on 2021/8/14
 */
@Component
@EndpointWebExtension(endpoint=TestEndpoint.class)
public class TestEndpointWebExtension {


    @WriteOperation
    public Map<String, String> test2(String name) {
        Map<String, String> result = new HashMap<String, String>();
        result.put("aaa", "1.0.0");
        result.put("bbb", "zhang san");
        return result;
    }
}
